package com.dbz.controller;

import com.dbz.entity.Modules;
import com.dbz.service.ModulesService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Set;

@RestController
@RequestMapping("/modules/")
public class ModulesController {
    @Resource
    private ModulesService modulesService;

    @RequestMapping("selectModelByUserName")
    public Set<Modules> getModule(String userName) {
        return modulesService.selectModelByUserName(userName);
    }

    /**
     * 查询所有
     * @return
     */
    @RequestMapping("getAll")
    public List<Modules> getAll(){
        return modulesService.getAll2();
    }

}
